package com.todo.content.common.base;

/**
 * @author azhebuxing
 * @date 2024/12/11 14:49
 * @description
 */
public class ContentKeyBuild {

    public static String buildContentDetailKey(Long contentId) {
        return String.format(ContentRedisKey.CONTENT_DETAIL_KEY, contentId);
    }

    public static String buildContentClassifySetKey() {
        return ContentRedisKey.CONTENT_CLASSIFY_SET_KEY;
    }

    public static String buildContentTopicDetailKey(Long topicId) {
        return String.format(ContentRedisKey.CONTENT_TOPIC_DETAIL_KEY, topicId);
    }

    public static String contentStatusChangeIdempotentKey(String messageId) {
        return String.format(ContentRedisKey.CONTENT_STATUS_CHANGE_IDEMPOTENT_KEY, messageId);
    }

    public static String contentCounterIdempotentKey(String messageId) {
        return String.format(ContentRedisKey.CONTENT_COUNTER_IDEMPOTENT_KEY, messageId);
    }
}
